package cn.iocoder.yudao.framework.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TenantReviewStatusEnum {

    UNAUTHENTICATED(0, "未认证"), PENDING(1, "待审核"), APPROVED(2, "审核成功"), REJECTED(3, "审核失败");

    private final Integer status;
    private final String desc;

    /**
     * 判断状态是否有效
     */
    public static boolean isValid(Integer status) {
        for (TenantReviewStatusEnum value : values()) {
            if (value.getStatus().equals(status)) {
                return true;
            }
        }
        return false;
    }
}
